<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/resource.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Upload by uploadify</title>
	<script type="text/javascript" src="${STATIC_URL}/jquery/1.10.1/jquery.min.js" />

	<link rel="stylesheet" href="${STATIC_URL}/uploadify/3.2.1/uploadify.css" />
	<script type="text/javascript" src="${STATIC_URL}/uploadify/3.2.1/jquery.uploadify.min.js" />

	<script type="text/javascript">
        $(function() {
            $("#file_upload").uploadify({
                height        : 30,
                swf           : '${STATIC_URL}/uploadify/3.2.1/uploadify.swf',
                uploader      : '${APP_URL}/upload/uploadFile',
                'fileObjName'   : 'file',           //默认 Filedata, $_FILES控件名称
                width         : 120
            });

            $("#doUpload").click(function() {
                $('#file_upload').uploadify('upload','*');
            });

            $("#cancelUpload").click(function() {
                $('#file_upload').uploadify('cancel','*');
            });
        });
	</script>
</head>
<body>
	<div id="uploadfileQueue"></div> //存放选择文件的 图片按钮的 Div
	<input type="file" id="file_upload" />
	<input type="button" id="doUpload" value="上传" />
	<input type="button" id="cancelUpload" value="取消上传" />
</body>
</html>